﻿<Window x:Class="WF.VecDraw.MainGui"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:t="clr-namespace:WF.VecDraw"
    xmlns:document="clr-namespace:Gencode.VECUtil;assembly=Gencode.VECUtil"
    xmlns:cmds="clr-namespace:WF.VecDraw.VecApp"
    Title="VecDraw" Height="761" Width="900" Loaded="Window_Loaded" SizeChanged="Window_SizeChanged" Icon="Images/VD.ico">
    
    <Window.CommandBindings>
        <CommandBinding Command="ApplicationCommands.Redo" CanExecute="CommandCanExecute" Executed="CommandExecuted" />
        <CommandBinding Command="ApplicationCommands.Undo" CanExecute="CommandCanExecute" Executed="CommandExecuted" />
        <CommandBinding Command="ApplicationCommands.SelectAll" CanExecute="CommandCanExecute" Executed="CommandExecuted" />
        <CommandBinding Command="ApplicationCommands.Stop" CanExecute="CommandCanExecute" Executed="CommandExecuted" />
        <CommandBinding Command="ApplicationCommands.Delete" CanExecute="CommandCanExecute" Executed="CommandExecuted" />
        <CommandBinding Command="cmds:VDCustomCommands.UnselectAll" CanExecute="CommandCanExecute" Executed="CommandExecuted" />
        <CommandBinding Command="cmds:VDCustomCommands.ZoomIn" CanExecute="CommandCanExecute" Executed="CommandExecuted" />
        <CommandBinding Command="cmds:VDCustomCommands.ZoomOut" CanExecute="CommandCanExecute" Executed="CommandExecuted" />
    </Window.CommandBindings>
        
    <Grid Background="LightGray">
        <Grid.Resources>
            <Image x:Key="New" Source="Images/Document.ico" Height="16" Width="16" />
            <Image x:Key="Undo" Source="Images/Undo16.png" Height="16" Width="16" />
            <Image x:Key="Redo" Source="Images/Redo16.png" Height="16" Width="16" />
        </Grid.Resources>
        
        <DockPanel LastChildFill="True" MouseMove="DockPanel_MouseMove">
            <Menu Name="mainMenu" ToolBar.OverflowMode="Never" DockPanel.Dock="Top">
                <MenuItem Header="File" Name="fileMenu">
                    <MenuItem Header="New" Click="New_Click" Icon="{StaticResource New}" />
                    <MenuItem Header="Open" Click="Open_Click"/>
                    <MenuItem Header="Save As" Click="SaveAs_Click"/>
                    <MenuItem Header="Exit" Click="Beenden_Click" />
                </MenuItem>
                
                <MenuItem Header="Edit">
                    <MenuItem Header="Undo" InputGestureText="Ctrl+Z" Command="ApplicationCommands.Undo" Icon="{StaticResource Undo}"/>
                    <MenuItem Header="Redo" InputGestureText="Ctrl+Y" Command="ApplicationCommands.Redo" Icon="{StaticResource Redo}"/>
                    <Separator/>
                    <MenuItem Header="Select All" InputGestureText="Ctrl+A" Command="ApplicationCommands.SelectAll"/>
                    <MenuItem Command="cmds:VDCustomCommands.UnselectAll"/>
                    <MenuItem Header="Delete" InputGestureText="Del" Command="ApplicationCommands.Delete"/>
                    <Separator/>
                    <MenuItem Header="Shape">
                        <MenuItem Header="To Polygon" Click="ToPoligon_Click" />
                    </MenuItem>
                </MenuItem>
                
                <MenuItem Header="View">
                    <MenuItem Command="cmds:VDCustomCommands.ZoomIn" />
                    <MenuItem Command="cmds:VDCustomCommands.ZoomOut" />
                    <Separator/>
                    <MenuItem Header="Show Grid" Name="MenuItemShowGrid" Click="ShowGrid_Click" IsCheckable="True" />
                    <MenuItem Header="Snap to Grid" Name="MenuItemSnapToGrid" IsCheckable="True" />
                    <Separator/>
                </MenuItem>
                
                <MenuItem Header="Window">
                    <MenuItem Header="Tools" Click="Tools_Click" HorizontalAlignment="Left" VerticalAlignment="Top" />
                    <MenuItem Header="Layers" Click="Layers_Click" HorizontalAlignment="Left" VerticalAlignment="Top" />
                </MenuItem>
            </Menu>
            
            <ToolBarTray Height="26" Name="toolBarTray1" DockPanel.Dock="Top" IsLocked="True">
                <ToolBar Band="1" BandIndex="1">
                    <Button Width="20" Height="20" Click="New_Click">
                        <Image ClipToBounds="True" Cursor="Hand" Source="Images/Document_16.png"/>
                    </Button>
                    <Separator/>
                    <Button Width="20" Height="20">
                        <Image ClipToBounds="True" Cursor="Hand" Source="Images/Symbol_Help_16.png"/>
                    </Button>
                    <Button Width="20" Height="20">
                        <Image ClipToBounds="True" Cursor="Hand" Source="Images/Symbol_Refresh_24.png" />
                    </Button>
                    <Button Width="20" Height="20" Command="ApplicationCommands.Redo">
                        <Image ClipToBounds="True" Cursor="Hand" Source="Images/Redo16.png" />
                    </Button>
                    <Button Width="20" Height="20" Command="ApplicationCommands.Undo">
                        <Image ClipToBounds="True" Cursor="Hand" Source="Images/Undo16.png" />
                    </Button>
                    
                </ToolBar>
            </ToolBarTray>
            
            <ToolBarTray Height="27" Name="toolBarPropertys" DockPanel.Dock="Top" IsLocked="True">
                <ToolBar Band="1" BandIndex="1">
                    <Separator Height="22"/>
                    <Image ClipToBounds="True" Margin="2" Width="16" Height="16" Source="Images/paintbucket_16.png"/>
                    <Button Name="fillColorButton" Margin="2" Width="20" Height="20" Click="FillColorButton_Click">
                        <Rectangle Name="fillColorRect" Width="16" Height="16" Stroke="Black" VerticalAlignment="Top" Fill="Transparent"></Rectangle>
                    </Button>

                    <Separator Height="22"/>
                    <Image ClipToBounds="True" Margin="2" Width="16" Height="16" Source="Images/Paint_16.png"/>
                    <Button Name="borderColorButton" Margin="2" Width="20" Height="20" Click="borderColorButton_Click">
                        <Rectangle Name="borderColorRect" Width="16" Height="16" Stroke="Black" VerticalAlignment="Top" Fill="Black"></Rectangle>
                    </Button>
                    <ComboBox Name="comboPintThicknes" Margin="2" Width="35" SelectionChanged="comboPintThicknes_SelectionChanged"></ComboBox>
                </ToolBar>
            </ToolBarTray>
            
            <StatusBar DockPanel.Dock="Bottom" Height="25">
                <StatusBarItem DockPanel.Dock="Left">
                    test1
                </StatusBarItem>
                <Separator DockPanel.Dock="Left" />
                
                <StatusBarItem DockPanel.Dock="Right">
                    <TextBlock Name="statusMousePos" Width="80" >0, 0</TextBlock>
                </StatusBarItem>
                <StatusBarItem DockPanel.Dock="Right">
                    <Image Source="Images\MouseChart_16.png" Height="16"></Image>
                </StatusBarItem>
                
                <Separator DockPanel.Dock="Right"/>
                <StatusBarItem DockPanel.Dock="Right">
                    <TextBlock Name="statusPageSize" Width="80">test3</TextBlock>
                </StatusBarItem>
                <StatusBarItem DockPanel.Dock="Right">
                    <Image Source="Images\PageSize_16.png" Height="16"></Image>
                </StatusBarItem>
                
                <Separator DockPanel.Dock="Right"/>
                <StatusBarItem DockPanel.Dock="Left">
                    test2
                </StatusBarItem>
            </StatusBar>
            
                <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
            
            
            <document:CanvasManager x:Name="canvasManager" Width="500" Height="500"></document:CanvasManager>
                <!--<Grid Name="canvasDockGrid" DockPanel.Dock="Top">-->
                
                    <!--<document:CanvasDocument x:Name="canvasManager" Width="500" Height="500" DockPanel.Dock="Top"></document:CanvasDocument>--> 
                    
                    <!--<t:CanvasGui x:Name="canvasGui"  Width="500" Height="500" DockPanel.Dock="Top" BorderBrush="Black" BorderThickness="1">
                        
                    </t:CanvasGui>-->
                <!--</Grid>-->
            </ScrollViewer>

        </DockPanel>
        
    </Grid>
</Window>
